<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    template="/WEB-INF/templates/cp/template.xhtml">
<ui:define name="content">

<h1 class="title">修改个人资料</h1>
<h:form>
    <h:panelGrid columns="2">
        <h:outputLabel for="email">邮箱：</h:outputLabel>        
	    <h:inputText value="#{currentUser.email}" id="email"/>
        <h:outputLabel for="oldPassword">旧密码：</h:outputLabel>
        <h:inputSecret value="#{userHelper.oldPassword}" id="oldPassword"/>	    
	    <h:outputLabel for="password">新密码：</h:outputLabel>
	    <h:inputSecret value="#{userHelper.newPassword}" id="password"/>
        <h:outputLabel for="rePassword">再输一遍：</h:outputLabel>
        <h:inputSecret value="#{userHelper.rePassword}" id="rePassword"/>
	</h:panelGrid>
	<h:commandButton value="保存" action="#{userHelper.saveProfile}"/>
</h:form>

</ui:define>
</ui:composition>
